import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
const { adminPath } = useGlobSetting();
export const tbAddNext = (params?: any, data?: any) =>
  defHttp.post({ url: adminPath + '/order/addNext', params, data });
export const uploadImg = (params?: any) =>
  defHttp.post({ url: adminPath + '/minio/file/upload', params });
// 意向转订单
export const tbYXtoDJ = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/deposit_order', params });
// 订金订单转派单量尺
export const tbDJtoPD = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/Dispatch_ruler', params });
// 派单量尺到设计师回图
export const tbPDtoSJSHT = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/Designer_back_drawing', params });
// 设计师回图到合同确图
export const tbSJSHTtoHTQT = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/contract_conclusive', params });
// 合同确图同意到下单审单
export const tbSJSHTtoXDSD = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/accept_contract', params });
// 合同确图拒绝到下单审单
export const tbSJSHTrejectXDSD = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/reject_contract', params });
// 下单审单拒绝到分单
export const tbXDSDrejectFD = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/reject_audit', params });
// 下单审单到分单
export const tbXDSDtoFD = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/accept_contract', params });
// 申请撤回
export const tbGoback = (params?: any) =>
  defHttp.get({ url: adminPath + '/orderStatus/application_withdrawn', params });
// 申请是否可以撤回
export const tbIsGoback = (params?: any) =>
  defHttp.get({ url: adminPath + '/orderStatus/Isapplication_withdrawn', params });
// 申请延期
export const tbDelay = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/apply_extension', params });
// 申请是否同意延期
export const tbIsagreeDelay = (params?: any, data?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/approval', params, data });
// 获取延期理由
export const tbgetDelayReason = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/show_approval', params });

export const tbsplitOrder = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/splitOrder', params });
// 完成订单
export const tbsupplierSplitOrder = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/supplierSplitOrder', params });

// 第二次完成订单
export const tbmanufactureToDelivery = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/manufactureToDelivery', params });
// 采购
export const tbPurchaseToProduction = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/purchaseToManufacture', params });
// 安装师傅
export const tbshowInstaller = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/showInstaller', params });

// 安装派单完成
export const tbsendingToInstalling = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/sendingToInstalling', params });

//  物流配送完成
export const tbdeliveryToInstallSending = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/deliveryToInstallSending', params });
  
  //  交付安装完成
export const tbinstallingToCheck = (params?: any) =>
defHttp.post({ url: adminPath + '/orderStatus/installingToCheck', params });

  //  交付验收完成
  export const tbcheckToEnding = (params?: any) =>
  defHttp.post({ url: adminPath + '/orderStatus/checkToEnding', params });